<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>

<bean:define id="role" value="${auth.role.roleType}" scope="session" />
<logic:equal name="role" value="dispatcher">
	<html:form action="/addEmployeeFlightCrewAction">
		<html:hidden property="flightCrewId" value="${flightCrewId}" />
		<h1>
			<bean:message key="crew.title.chooseEmployee" />
		</h1>
		<c:forEach var="emp" items="${employees}">
			<table>
				<tr>
					<th><html:radio property="employeeId" value="${emp.id}">${emp.name} ${emp.surname} </html:radio>
					</th>
				</tr>
			</table>
		</c:forEach>
		<html:submit>
			<bean:message key="crew.add.employee" />
		</html:submit>
	</html:form>
</logic:equal>